home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AmigActive 23
/
AACD 23.iso
/
AACD
/
Programming
/
tek
/
msg
/
putreplymsg.c
< prev
next >
Wrap
C/C++ Source or Header
|
2001-05-12
|
722b
|
37 lines
#include "tek/msg.h"
#include "tek/kn/exec.h"
/*
** TEKlib
** (C) 2001 TEK neoscientists
** all rights reserved.
**
** TVOID TPutReplyMsg(TPORT *msgport, TPORT *replyport, TAPTR msg)
**
** put msg to msgport, with a reply expected at replyport, reliable
**
** replyport may be NULL
**
*/
TVOID TPutReplyMsg(TPORT *msgport, TPORT *replyport, TAPTR mem)
{
if (msgport && mem)
{
TMSG *msg = ((TMSG *) mem) - 1;
msg->replyport = replyport;
msg->sender = TNULL; /* sender is local address space */
msg->status = TMSG_STATUS_SENT | TMSG_STATUS_PENDING;
kn_lock(&msgport->lock);
TAddTail(&msgport->msglist, (TNODE *) msg);
TSignal(msgport->sigtask, msgport->signal);
kn_unlock(&msgport->lock);
}
}